import os
import yaml


class ReadConfig:
    def get_yaml_data(self):
        #current_path = os.path.abspath(".")
        current_path = 'D:\\PycharmWorkspace\\selenium_1\\Auto_interfaceTest\\common_utils\\'
        yaml_path = os.path.join(current_path, "config.yml")

        file = open(yaml_path, 'r', encoding="utf-8")
        file_data = file.read()
        result = yaml.safe_load(file_data)
        return result


if __name__ == "__main__":
    r = ReadConfig()
    print(r.get_yaml_data().get('host'))
